load("@rules_rust//rust:toolchain.bzl", "rust_toolchain")

rust_toolchain(
    name = "rust_toolchain",
    binary_ext = "",
    cargo = "@nix_rust//:cargo",
    clippy_driver = "@nix_rust//:clippy_driver",
    default_edition = "2021",
    dylib_ext = ".so",
    env = {},
    exec_triple = "x86_64-unknown-nixos-gnu",
    extra_exec_rustc_flags = [],
    extra_rustc_flags = [],
    rust_doc = "@nix_rust//:rustdoc",
    rust_std = "@nix_rust//:rust_std-aarch64-linux-android",
    rustc = "@nix_rust//:rustc",
    rustc_lib = "@nix_rust//:rustc_lib",
    staticlib_ext = ".a",
    stdlib_linkflags = [],
    tags = ["manual"],
    target_triple = "aarch64-linux-android",
)

toolchain(
    name = "toolchain",
    exec_compatible_with = [
        "@platforms//cpu:x86_64",
        "@platforms//os:nixos",
    ],
    target_compatible_with = [
        "@platforms//cpu:aarch64",
        "@platforms//os:android",
    ],
    toolchain = ":rust_toolchain",
    toolchain_type = "@rules_rust//rust:toolchain_type",
)
